/*文件名称：student_complete_record.css
存储路径：frontend/static/css/student_complete_record.css*/
/* 学生档案完整录入及编辑修改模块样式 */

/* 基础样式 */
body {
  background-color: #f8f9fa;
}

/* 查询容器 */
#search-container {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

/* 查询结果区域 */
#search-results {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

#search-results .card {
  border: none;
  box-shadow: none;
}

/* 分页控件 */
#pagination-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin: 20px 0;
}

#pagination-bar .page-btn {
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  background: #fff;
  color: #007bff;
  text-decoration: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

#pagination-bar .page-btn:hover:not(:disabled) {
  background: #e9ecef;
  border-color: #007bff;
}

#pagination-bar .page-btn.active {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
}

#pagination-bar .page-btn:disabled {
  background: #e9ecef;
  color: #6c757d;
  cursor: not-allowed;
  border-color: #dee2e6;
}

/* 学生档案区域 */
#student-record-area {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 20px;
}

/* 操作按钮区 */
.action-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.action-buttons .btn {
  transition: all 0.2s;
}

.action-buttons .btn.active {
  box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
  transform: translateY(-1px);
}

/* 折叠组样式 */
.section-card {
  border: 1px solid #e3e6f0;
  border-radius: 8px;
  margin-bottom: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.section-card:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.section-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 15px 20px;
  cursor: pointer;
  margin-top: 20px;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-header:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.section-header.expanded {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.section-header i:first-child {
  margin-right: 10px;
  font-size: 1.1em;
}

.toggle-icon {
  transition: transform 0.3s ease;
  font-size: 1.2em;
}

.section-header.expanded .toggle-icon {
  transform: rotate(180deg);
}

.section-content {
  border: 1px solid #e3e6f0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  background: #f8f9fa;
}

.section-content.collapsed {
  display: none;
}

/* 表单样式增强 */
.form-label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 5px;
}

.form-label .required {
  color: #dc3545;
  margin-left: 2px;
}

.form-control, .form-select {
  border: 1px solid #ced4da;
  border-radius: 6px;
  padding: 8px 12px;
  transition: all 0.2s;
  background: #fff;
}

.form-control:focus, .form-select:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* 不同编辑模式的样式 */
#student-form.readonly-mode .form-control,
#student-form.readonly-mode .form-select {
  background-color: #f8f9fa;
  border-color: #dee2e6;
  color: #6c757d;
}

#student-form.edit-mode .form-control:disabled,
#student-form.edit-mode .form-select:disabled {
  background-color: #e9ecef;
  border-color: #ced4da;
  color: #6c757d;
}

#student-form.modify-mode .form-control,
#student-form.modify-mode .form-select {
  border-color: #ffc107;
  background-color: #fff8e1;
}

/* 记录显示区域 */
.record-item {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 10px;
  background: white;
  transition: all 0.3s ease;
}

.record-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.record-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.record-type {
  background: #007bff;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.record-content .row > div {
  margin-bottom: 5px;
}

.btn.active {
  background-color: #007bff;
  border-color: #007bff;
  color: white;
}

.toggle-icon {
  transition: transform 0.3s ease;
}

.text-muted {
  text-align: center;
  padding: 20px;
  font-style: italic;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .action-buttons {
    flex-direction: column;
  }
  
  .action-buttons .btn {
    width: 100%;
    margin-bottom: 5px;
  }
  
  .section-header {
    padding: 12px 15px;
    font-size: 0.95em;
  }
  
  .section-content {
    padding: 15px;
  }
  
  .record-content {
    grid-template-columns: 1fr;
  }
  
  #search-container .row > div {
    margin-bottom: 10px;
  }
}

@media (max-width: 576px) {
  #student-record-area {
    padding: 15px;
  }
  
  .section-header {
    padding: 10px 12px;
  }
  
  .section-content {
    padding: 12px;
  }
  
  .record-item {
    padding: 12px;
  }
}

/* 按钮状态动画 */
.btn {
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn:active {
  transform: translateY(0);
}

/* 加载状态 */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* 表格增强 */
.table th {
  background-color: #f8f9fa;
  border-top: none;
  font-weight: 600;
  color: #495057;
}

.table td {
  vertical-align: middle;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0,123,255,0.05);
}

/* 成功/错误提示样式 */
.alert {
  border: none;
  border-radius: 6px;
  padding: 12px 16px;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
}

/* 工具提示样式 */
[data-bs-toggle="tooltip"] {
  cursor: help;
}

/* 自定义滚动条 */
.section-content::-webkit-scrollbar {
  width: 6px;
}

.section-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.section-content::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.section-content::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* 干预记录表单样式 */
.intervention-form .card {
    margin-bottom: 20px;
    border: 1px solid #e3e6f0;
    border-radius: 8px;
}

.intervention-form .card-header {
    background-color: #007bff;
    color: #fff;
    font-weight: bold;
    border-bottom: 1px solid #e3e6f0;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.intervention-form .card-body {
    padding: 20px;
}

.intervention-form .form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.intervention-form .form-control,
.intervention-form .form-select {
    border-radius: 4px;
    border: 1px solid #ced4da;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    transition: border-color 0.3s;
}

.intervention-form .form-control:focus,
.intervention-form .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.intervention-form .form-check-inline {
    margin-right: 1rem;
    margin-bottom: 0.5rem;
}

.intervention-form .form-check-input {
    margin-top: 0.3rem;
}

.intervention-form .form-check-label {
    font-size: 0.9rem;
    margin-left: 0.25rem;
}

/* 穴位和贴压方式选择区域 */
.intervention-form .col-md-4 > div,
.intervention-form .col-md-4 > div {
    max-height: 120px;
    overflow-y: auto;
    padding: 0.5rem;
    border: 1px solid #e3e6f0;
    border-radius: 4px;
    background-color: #f8f9fa;
}

/* 按钮样式 */
.intervention-form .btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.intervention-form .btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* 模式按钮样式 */
.btn-group .btn.active {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.btn-outline-warning.active {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
}

.btn-outline-danger.active {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* 记录展示样式 */
.record-item {
    transition: all 0.3s ease;
}

.record-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.record-actions .btn {
    margin-left: 0.5rem;
}

.card-header h6 {
    color: #495057;
    font-weight: 600;
}

/* 记录字段展示 */
.record-item .col-md-6,
.record-item .col-lg-4 {
    padding: 0.25rem 0.75rem;
}

.record-item strong {
    color: #6c757d;
    font-size: 0.9rem;
}

/* 空状态样式 */
.text-muted {
    text-align: center;
    padding: 2rem;
    font-style: italic;
}

/* 权限按钮组 */
.btn-group {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
